/** 
  -- The Performance Driven Lime Project -- 

  A self adaptive tuple space for mobile agents and hosts by dynamic
  adapting tuple's replication policy.
  
  Copyright (C) 2008
  Xing Jiankuan, Pan Wenhui
  SAGroup of Tsinghua University

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  Lesser General Public License for more details.

  You should have received this copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
 */

package sagroup.pdlime;

import lights.adapters.Tuple;
import lights.interfaces.ITuple;
import lime2.LimeTemplate;
import lime2.Location;

/**
 * Defines various (static) constants. Please note that static initialization
 * occurs only if it is necessary: these values are initialized as soon as they
 * are required.
 * 
 * @author Pan Wenhui
 */
public interface TVRLimeConstants {

	// The constants which describe the position of the "system
	// information" fields within a versionfied tuple are not in
	// this file because they are auto generated to TVRWrapper.

	static final long INITIAL_VER_NUM = 0L;
	static final long INVALID_VER_NUM = INITIAL_VER_NUM - 1;
	
	// Positions of fields. This field does not contain LimeTuple fields.
	static final int TYPE_TAG = 0;
	static final int VID_TAG = 1;
	static final int VER_TAG = 2;
	static final int MASTER_CURR_TAG = 3;
	static final int MASTER_DEST_TAG = 4;
	static final int IS_REPLICA_TAG = 5;

	static final int TAGS_NUMBER = 6;

	/**
	 * An empty tuple. It can be used as a template to match any tuple.
	 */
	static final ITuple NULLTUPLE = new Tuple();
	// an empty Tuple, we need it because we must construct template.
	static final LimeTemplate DUMMY_LT = new LimeTemplate(Location.UNSPECIFIED,
			Location.UNSPECIFIED, new Tuple());
}
